<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="/authtaglib" prefix="auth" %>
<!DOCTYPE html>
<html>
<head>
    <title>人员管理</title>
    <jsp:include page="/include.jsp"/>
    <script type="text/javascript">

        function showFileUpload(callbackId) {
            $('<div/>').dialog({
                href: '${pageContext.request.contextPath}/cnbdw/commons/select-demo-content.jsp',
                modal: true,
                top: 0,
                left: ($(window.top).width() - 600) * 0.5,
                width: 700,
                title: '选择人员',
                buttons: [
                    {
                        text: '保存',
                        iconCls: '',
                        id: 'fileUploadDialog',
                        handler: function () {
                            var d = $(this).closest('.window-body');
                            var datagrid = $('#datagrid1').datagrid("getData");

                            var ids = [];
                            $.each(datagrid.rows, function (index, item) {
                                ids.push(item.id);
                            });
                            $('#callBackId').val(ids.join(","));
                            d.dialog('destroy');
                        }
                    }
                ],
                onClose: function () {
                    $(this).dialog('destroy');
                }
            });
        }
    </script>
</head>
<body class="easyui-layout">
<input id="callBackId" style="width:100%" value=""/>
<input id="xx" type="button" value="选择" onclick="showFileUpload('callBackId')">
</body>
</html>

